#include <iostream>
using namespace std;

class Complex {
	public:
		Complex(double r = 0.0, double i = 0.0) : real(r), imaginary(i) {}
		Complex operator + (int r) {
			return Complex(real + r, imaginary);
		}
		friend Complex operator +(int r, const Complex &C);
		void display() const {
			cout << real << "," << imaginary << endl;
		}
	private:
		double real;
		double imaginary;
};

Complex operator +(int r, const Complex &C) {
	return Complex(C.real + r, C.imaginary);
}

int main() {
	Complex a(1.0, 2.0);
	Complex c;
	c = a + 5;
	c.display();
	c = 5 + a;
	c.display();
	return 0;
}